package com.atjg.autocat.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.atjg.autocat.main.App
import com.atjg.autocat.main.SplashActivity
import com.zhy.baselibrary.utils.Klog


class BootBroadcastReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        //开机广播
        if (Intent.ACTION_BOOT_COMPLETED == intent?.action){
            Klog.d("--------------开机广播接收成功---------------")
            App.mHanler?.postDelayed({
                val activityIntent = Intent(context, SplashActivity::class.java)
                activityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                context?.startActivity(activityIntent)
            },10000)

        }
    }
}